﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductDetailControl.ascx.cs" Inherits="MpSoft.Web.Controls.Product.ProductDetailControl" %>
<div class="prodetail clear">
    <div class="prod-c-l">
        <div class="prod-show-img">
            <a class="img" href="#">
                <img src="<%= !string.IsNullOrEmpty(Product.Images) ? Product.Images.Insert(8, "/_thumbs") : "" %>" />
            </a>
        </div>
    </div>
    <div class="prod-c-r">
        <h1><%= Product.ProductName %></h1>
        <div class="prod-detail">
            <p><%= Product.IsExist?"Kho: Còn hàng":"Kho: hết hàng" %></p>
             <p><%= ShowPrice(double.Parse(Product.Price.ToString()), double.Parse(Product.PriceNew.ToString())) %></p>
            <p><a href='/Services/ProductCart.ashx?type=addcart&prodid=<%= Product.ProductID %>&quantity=1' class="btn">Đặt mua</a></p>
           <%-- <p>Bảo hành: <%= Product.Warranty %></p>
            <p>Màu sắc: <%= Product.Color %></p>--%>
        </div>
    </div>
</div><br />
<h2 class="box-tit"><img src="/Images/mui_ten.gif"> <span>thông tin sản phẩm</span></h2>
<%if(!string.IsNullOrEmpty(Product.Content)){ %>
<div class="prod-detail">
    <%= Product.Content %>
</div>
<%} %>
<h2 class="box-tit"><img src="/Images/mui_ten.gif"> <span>Sản phẩm liên quan</span></h2>
<%@ Import Namespace="MpSoft.Library.CommonLibrary" %>
<ul class="list-prod-options">
    <asp:Repeater ID="rpList" runat="server">
        <ItemTemplate>
            <li class="prod-item item-<%# Container.ItemIndex%3 %>"><p class="cate"><img src="/Images/posts.gif" /><%# GetCategoy(Eval("CategoryID").ToString()) %></p><a class="img" href="<%# !string.IsNullOrEmpty(Eval("FormatUrl").ToString()) ? string.Format(Eval("FormatUrl").ToString(), Eval("ProductID")) : "" %>"><img src="<%# !string.IsNullOrEmpty(Eval("Images").ToString()) ? Eval("Images").ToString().Insert(8, "/_thumbs") : "" %>" /></a> <a class="name" href="<%# !string.IsNullOrEmpty(Eval("FormatUrl").ToString()) ? string.Format(Eval("FormatUrl").ToString(), Eval("ProductID")) : "" %>"><%# Eval("ProductName") %></a><pre class="price"><%# double.Parse(Eval("Price").ToString()) > 0 ? Filter.Money(Eval("Price").ToString()) : "Vui lòng liên hệ" %></pre></li>
        </ItemTemplate>
    </asp:Repeater>
</ul>
